package com.cartagena.vraptor.extjs;

import br.com.caelum.vraptor.View;

public interface ExtJSJson extends View {
    
    public enum ContentType {
        JSON("application/json"),
        TEXT("text/html");
        
        private String value;
        
        private ContentType(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    public ExtJSJson from(Object object, ContentType type);
    
    public ExtJSJson from(Object object);

    public ExtJSJson success();

    public ExtJSJson success(boolean success);

    public ExtJSJson serialize();
}
